package com.mingliqiye.minecraft.enchantment.conflict.common;

public enum ExceptionCode {
    ERROR_INTERNAL_SERVER(500),
    ERROR_PAYMENT_REQUIRED(402),
    ERROR_NOT_FOUND(404),
    ERROR_METHOD_NOT_ALLOWED(405),
    ERROR_UNAUTHORIZED(401),
    ERROR_FORBIDDEN(403),
    OK(200);

    public int getValue() {
        return value;
    }

    private final int value;

    ExceptionCode(int value) {
        this.value = value;
    }

    public static ExceptionCode getExceptionCode(int value) {
        for (ExceptionCode exceptionCode : ExceptionCode.values()) {
            if (exceptionCode.value == value) {
                return exceptionCode;
            }
        }
        return null;
    }
}
